<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:include page="/WEB-INF/jsp/common/_scripts.jsp" />
<%@ include file="/WEB-INF/jsp/common/_includes.jsp" %>

<!DOCTYPE html>
<html>
<head>
<title>子栏目列表</title>
</head>
<body>
<div id="container" class="thirteen wide column">
	 <ol class="breadcrumb">
		<li></li>
	 </ol>
	  <table class="table table-hover">
	      <thead>
	      <tr>
	          <th>ID</th>
	          <th>code值</th>
	          <th>节点名称</th>
	          <th>父节点code值</th>
	          <th>操作</th>
	      </tr>
	      </thead>
	      <tbody>
	      <c:forEach items="${dicDataList }" var="dicData">
	          <tr>
	              <td>${dicData.id }</td>
	              <td>${dicData.code }</td>
	              <td>${dicData.text }</td>
	              <td>${dicData.level }</td>
	              <td>
	              	  <a class="btn active btn-primary btn-sm"  href="/helpcenter/inputContent/${dicData.code }">录入内容</a>
	          		</td>
	          </tr>
	      </c:forEach>
	      </tbody>
	  </table>
	  
	  <div class="page-info clearfix">
	       <jsp:include page="/WEB-INF/jsp/common/_page.jsp"/>
	  </div>
</div>
<script type="text/javascript">
	$(function(){
		var nodeId = window.parent.nodeId;
		var nodeName = window.parent.nodeName;
		$("ol.breadcrumb>li").text("当前目录："+nodeName);
		$("#level").val(nodeId);
		
		$('a.btn-success,a.btn-danger,a.btn-warning,a.js_internal').click(function(){
			var obj = $(this);
			var isAudit = obj.attr("isAudit");
			var title = obj.attr("title");
			var label = obj.attr("label");
			parent.window.Confirm(title, label, function(){
				window.parent.$('#js_submit').button('loading');
				window.parent.$.get(obj.attr("ref"), {isAudit:isAudit}, function(res){
					window.parent.$('#js_submit').button('reset');
					if(res.status == 'ok'){
						success(res.message);
						setTimeout(window.location.reload(),1000);
					}else{
						error(res.message);
						setTimeout(window.location.reload(),1000);
					}
				}); 
			});
		});
	});
</script>
</body>
</html>